package cn.wsalix.admin.service;

import java.util.List;

import cn.anlaser.service.CommonService;
import cn.wsalix.admin.entity.MenuPermit;
import cn.wsalix.admin.entity.Permit;
import cn.wsalix.admin.entity.SysMenu;
import cn.wsalix.admin.form.PermitForm;
import cn.wsalix.admin.repository.PermitRepository;

public interface PermitService extends
		CommonService<PermitForm, PermitRepository, Permit> {

	List<Permit> findUnsByMenuId(Long menuId);

	void delAll();

	/**
	 * @return 获取所有权限
	 */
	List<MenuPermit> findAllMenuPermit();

	/**
	 * @return 获取所有权限
	 */
	List<Permit> findAdminPermits();

	public Permit findByNameOne(String name);
	
	public List<Permit> findsByName(String name);

	public Permit findByCodeOne(String code);
	
	public List<Permit> findsByCode(String code);
}
